//
//  LXLImageButton.m
//  FZAH
//
//  Created by 李小龙 on 17/3/24.
//  Copyright © 2017年 zdqk. All rights reserved.
//

#import "LXLImageButton.h"

@implementation LXLImageButton

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.imageView = [[UIImageView alloc] initWithFrame:self.bounds];
        [_imageView setContentMode:UIViewContentModeScaleAspectFill];
        [_imageView setClipsToBounds:YES];
        [self addSubview:_imageView];
        
        self.deleteButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_deleteButton setFrame:CGRectMake(self.width-26.0, 0.0, 26.0, 26.0)];
        [_deleteButton setImage:[UIImage imageNamed:@"a"] forState:UIControlStateNormal];
        [self addSubview:_deleteButton];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
